package com.his.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.his.service.MxjOperationDetailService;
import com.his.vo.MxjOperationParticularsVO;
@Controller
public class VisitController {
	@Autowired
	private MxjOperationDetailService operationDetailService;
	@RequestMapping("/to_outop")
	public ModelAndView toout2(){
		ModelAndView modelAndView = new ModelAndView("his_operation");
		return modelAndView;
	}
	
	@RequestMapping("/to_op_drug2")
	public ModelAndView toopdrug2(){
		ModelAndView modelAndView = new ModelAndView("operation_drug");
		return modelAndView;
	}
	
	@RequestMapping("/to_op_apparatus2")
	public ModelAndView toopapparatus2(){
		ModelAndView modelAndView = new ModelAndView("operation_apparatus");
		return modelAndView;
	}
	
	@RequestMapping("/to_obj")
	public String toObejct(){
		return "ObejctTest";
	}
	
	@RequestMapping("/to_opdetail2")
	public ModelAndView toOperationDetail2(){
		ModelAndView modelAndView = new ModelAndView("operation_detail");
		return modelAndView;
	}
	
	@RequestMapping("/to_nurse")
	public ModelAndView tonurse(long ssNo){
		MxjOperationParticularsVO op=operationDetailService.querybyssNo(ssNo);
		ModelAndView mv=new ModelAndView("nurse");
		mv.addObject("brName", op.getBrName());
		mv.addObject("age", op.getBrAge());
		mv.addObject("price", op.getSsCost());
		mv.addObject("grade", op.getDjName());
		mv.addObject("remarks", op.getRemarks());
		mv.addObject("sex", op.getBrSex());
		mv.addObject("ssmxEndtime", op.getSsEndtime());
		mv.addObject("ssmxStarttime", op.getSsStarttime());
		mv.addObject("ssName", op.getSsName());
		mv.addObject("sssName", op.getSssName());
		mv.addObject("type", op.getLxName());
		mv.addObject("ygName", op.getYgName());
		return mv;
	}
	
	@RequestMapping("/to_calling")
	public ModelAndView tocallsystem(String name){
		ModelAndView mv=new ModelAndView("call_system");
		mv.addObject("name",name);
		return mv;
	}
	
	@RequestMapping("/to_station")
	public String tolarout(){
		return "operation_sation";
	}
}
